/*
    Delegate

    By Josh Wolfhead

    i can't even understand my own code......

    USEAGE
    ==============================================================
    Normal function delegate:

    void hello(int i)
    {
        printf("hello delegate %d\n",i);
        return;
    }

    void goodbye(int i)
    {
        printf("goodbye delegate %d\n",i);
        return;
    }


    delegate<void(int)> d(hello);
    d += goodbye;
    d(0);
   
    Result:

    hello delegate 0
    goodbye delegate 0

    ===============================================================
    Member function delegate:

    class Test
    {
    public:
        void hello(int i)
        {
            printf("hello delegate %d\n", i);
        }

        void goodbye(int i)
        {
            printf("goodbye delegate %d\n", i);
        }
    };

    void shakeHands(int i)
    {
        printf("shake %d\n", i);
    }

    Test t;
    delegate<void(int)> d(&t, &Test::hello);

    d += shakeHands;

    d += delegate<void(int)>(&t, &Test::goodbye);
    d(0);

    Result:
    hello delegate 0
    shake 0
    goodbye delegate 0

    As you see you can mix member functions and normal functions together

	===============================================================
	Notice:
	if ACAPELLA_DELEGATE_AS_FUNCTOR is defined

	then the delegate object will just act lick a functor
*/
#ifndef _DELEGATE_H_
#define _DELEGATE_H_

#include <acapella/acapella.h>
#include <acapella/traits.h>
#include <acapella/shared_ptr.hpp>
#include <vector>

namespace acapella
{
namespace delegate
{

template<typename T>
class delegate;

template<typename T>
class delegate_list;

namespace detail
{
}


#define DELEGATE_LIST(TEMPLATE_ARGS, FUNCTION_ARGS, FUNCTION_PARA)\
\
	template< typename Ret TEMPLATE_ARGS >\
    class delegate_list<Ret (FUNCTION_ARGS)>\
    {\
	public:\
		typedef delegate_list<Ret (FUNCTION_ARGS)> delegate_list_type;\
		typedef delegate<Ret (FUNCTION_ARGS)> delegate_type;\
		typedef Ret return_type;\
		typedef acapella::shared_ptr<delegate_type> FunctionHolderPtr;\
		\
        delegate_list(){};\
        ~delegate_list(){disconnect();};\
		\
		typedef std::vector<FunctionHolderPtr> HolderType;\
        typedef typename HolderType::iterator  HolderIterator;\
		HolderType  m_hs;\
        \
		delegate_list(delegate_type del)\
        {\
            m_hs.push_back(FunctionHolderPtr(new delegate_type(del)));\
        }\
\
		delegate_list& operator+(const delegate_type& rhs)\
		{\
			m_hs.push_back(FunctionHolderPtr(new delegate_type(rhs)));\
			return *this;\
		}\
\
		delegate_list& operator+=(const delegate_type& rhs)\
		{\
			*this = *this + rhs;\
			return *this;\
		}\
\
        void disconnect()\
        {\
            m_hs.clear();\
        }\
\
        bool connected() const\
        {\
            return (m_hs.size() != 0);\
        }\
\
        Ret operator()(FUNCTION_ARGS)\
        {\
			for (HolderIterator it = m_hs.begin();\
				 it != m_hs.end() - 1;\
				 ++it)\
			{\
				(**it)(FUNCTION_PARA);\
			}\
			return (**(m_hs.end() - 1))(FUNCTION_PARA);\
        }\
    };\


#define DELEGATE(TEMPLATE_ARGS, FUNCTION_ARGS, FUNCTION_PARA)\
	\
	template< typename Ret TEMPLATE_ARGS >\
	class delegate<Ret (FUNCTION_ARGS)>\
	{\
	private:\
		typedef delegate_list<Ret (FUNCTION_ARGS)> delegate_list_type;\
		typedef delegate<Ret (FUNCTION_ARGS)> delegate_type;\
		typedef Ret return_type;\
		\
		struct FunctionHolder\
		{\
			virtual Ret operator()(FUNCTION_ARGS) = 0;\
			virtual ~FunctionHolder(){};\
		};\
		typedef acapella::shared_ptr<FunctionHolder> FunctionHolderPtr;\
		\
		\
		template<typename Functor> struct FunctorHolder\
		:public FunctionHolder\
		{\
			Functor Fun;\
			\
			FunctorHolder(Functor nfun) : Fun(nfun){}\
			\
			virtual Ret operator()(FUNCTION_ARGS)\
			{\
			return (Fun)(FUNCTION_PARA);\
			}\
			\
		};\
		\
		template<typename U, typename MemFun> struct MemHolder\
		: public FunctionHolder\
		{\
			typename traits::type_traits<U>::pointer_type pObj;\
			MemFun memFun;\
			\
			MemHolder(typename traits::type_traits<U>::pointer_type aObj, MemFun amfun)\
				: pObj(aObj), memFun(amfun){}\
			\
			virtual Ret operator()(FUNCTION_ARGS)\
			{\
				return (pObj->*memFun)(FUNCTION_PARA);\
			}\
		};\
		\
	public:\
		delegate(){};\
		~delegate(){disconnect();};\
		\
		typedef FunctionHolderPtr HolderType;\
		\
		HolderType  m_hs;\
		\
		template<typename Functor> delegate(Functor nfun_)\
		{\
			m_hs = FunctionHolderPtr(new FunctorHolder<Functor>(nfun_));\
		}\
		\
		template <typename U, typename MemFun>\
		delegate(U* pObj, MemFun mFun)\
		{\
			m_hs = FunctionHolderPtr(new MemHolder<U, MemFun>(pObj, mFun));\
		}\
		\
		void disconnect()\
		{\
			m_hs = FunctionHolderPtr(0);\
		}\
		\
		bool connected() const\
		{\
			return (m_hs != 0);\
		}\
		\
		Ret operator()(FUNCTION_ARGS)\
		{\
			return (*m_hs)(FUNCTION_PARA);\
		}\
	};\


	template<typename FuncType>
	struct delegate_type
	{};

	template<typename FuncType>
	struct delegate_list_type
	{};

#define DELEGATE_TYPE(TEMPLATE_ARGS, TEMPLATE_PARA)\
	template<typename RtVal, typename T TEMPLATE_ARGS>\
	struct delegate_type<RtVal (T::*)(TEMPLATE_PARA)>\
	{\
		typedef delegate<RtVal(TEMPLATE_PARA)> type;\
	};\
	\
	template<typename RtVal TEMPLATE_ARGS>\
	struct delegate_type<RtVal (*)(TEMPLATE_PARA)>\
	{\
		typedef delegate<RtVal(TEMPLATE_PARA)> type;\
	};\
	template<typename RtVal, typename T TEMPLATE_ARGS>\
	struct delegate_list_type<RtVal (T::*)(TEMPLATE_PARA)>\
	{\
		typedef delegate_list<RtVal(TEMPLATE_PARA)> type;\
	};\
	\
	template<typename RtVal TEMPLATE_ARGS>\
	struct delegate_list_type<RtVal (*)(TEMPLATE_PARA)>\
	{\
		typedef delegate_list<RtVal(TEMPLATE_PARA)> type;\
	};\
	


	template<typename T, typename Func>
	typename delegate_type<Func>::type
		create_delegate(
			T* pObj,
			Func func
		)
	{
		return typename delegate_type<Func>::type(pObj, func);
	}

	template<typename Func>
	typename delegate_type<Func>::type
		create_delegate(
			Func func
		)
	{
		return typename delegate_type<Func>::type(func);
	}

	template<typename T, typename Func>
	typename delegate_type<Func>::type
		create_delegate_list(
		T* pObj,
		Func func
		)
	{
		return typename delegate_list_type<Func>::type(pObj, func);
	}

	template<typename Func>
	typename delegate_type<Func>::type
		create_delegate_list(
		Func func
		)
	{
		return typename delegate_list_type<Func>::type(func);
	}



/************************************************************************/
/* Auto Generated Code                                                  */
/************************************************************************/
#define ACAPELLA_TEMPLATE_ARGS_0
#define ACAPELLA_TEMPLATE_PARA_0
#define ACAPELLA_FUNCTION_ARGS_0 void
#define ACAPELLA_FUNCTION_PARA_0

#define ACAPELLA_TEMPLATE_ARGS_1 ,typename T0
#define ACAPELLA_TEMPLATE_PARA_1 T0
#define ACAPELLA_FUNCTION_ARGS_1 T0 t0
#define ACAPELLA_FUNCTION_PARA_1 t0

#define ACAPELLA_TEMPLATE_ARGS_2 ACAPELLA_TEMPLATE_ARGS_1, typename T1
#define ACAPELLA_TEMPLATE_PARA_2 ACAPELLA_TEMPLATE_PARA_1, T1
#define ACAPELLA_FUNCTION_ARGS_2 ACAPELLA_FUNCTION_ARGS_1, T1 t1
#define ACAPELLA_FUNCTION_PARA_2 ACAPELLA_FUNCTION_PARA_1, t1

#define ACAPELLA_TEMPLATE_ARGS_3 ACAPELLA_TEMPLATE_ARGS_2, typename T2
#define ACAPELLA_TEMPLATE_PARA_3 ACAPELLA_TEMPLATE_PARA_2, T2
#define ACAPELLA_FUNCTION_ARGS_3 ACAPELLA_FUNCTION_ARGS_2, T2 t2
#define ACAPELLA_FUNCTION_PARA_3 ACAPELLA_FUNCTION_PARA_2, t2

#define ACAPELLA_TEMPLATE_ARGS_4 ACAPELLA_TEMPLATE_ARGS_3, typename T3
#define ACAPELLA_TEMPLATE_PARA_4 ACAPELLA_TEMPLATE_PARA_3, T3
#define ACAPELLA_FUNCTION_ARGS_4 ACAPELLA_FUNCTION_ARGS_3, T3 t3
#define ACAPELLA_FUNCTION_PARA_4 ACAPELLA_FUNCTION_PARA_3, t3

#define ACAPELLA_TEMPLATE_ARGS_5 ACAPELLA_TEMPLATE_ARGS_4, typename T4
#define ACAPELLA_TEMPLATE_PARA_5 ACAPELLA_TEMPLATE_PARA_4, T4
#define ACAPELLA_FUNCTION_ARGS_5 ACAPELLA_FUNCTION_ARGS_4, T4 t4
#define ACAPELLA_FUNCTION_PARA_5 ACAPELLA_FUNCTION_PARA_4, t4

#define ACAPELLA_TEMPLATE_ARGS_6 ACAPELLA_TEMPLATE_ARGS_5, typename T5
#define ACAPELLA_TEMPLATE_PARA_6 ACAPELLA_TEMPLATE_PARA_5, T5
#define ACAPELLA_FUNCTION_ARGS_6 ACAPELLA_FUNCTION_ARGS_5, T5 t5
#define ACAPELLA_FUNCTION_PARA_6 ACAPELLA_FUNCTION_PARA_5, t5

#define ACAPELLA_TEMPLATE_ARGS_7 ACAPELLA_TEMPLATE_ARGS_6, typename T6
#define ACAPELLA_TEMPLATE_PARA_7 ACAPELLA_TEMPLATE_PARA_6, T6
#define ACAPELLA_FUNCTION_ARGS_7 ACAPELLA_FUNCTION_ARGS_6, T6 t6
#define ACAPELLA_FUNCTION_PARA_7 ACAPELLA_FUNCTION_PARA_6, t6

#define ACAPELLA_TEMPLATE_ARGS_8 ACAPELLA_TEMPLATE_ARGS_7, typename T7
#define ACAPELLA_TEMPLATE_PARA_8 ACAPELLA_TEMPLATE_PARA_7, T7
#define ACAPELLA_FUNCTION_ARGS_8 ACAPELLA_FUNCTION_ARGS_7, T7 t7
#define ACAPELLA_FUNCTION_PARA_8 ACAPELLA_FUNCTION_PARA_7, t7

#define ACAPELLA_TEMPLATE_ARGS_9 ACAPELLA_TEMPLATE_ARGS_8, typename T8
#define ACAPELLA_TEMPLATE_PARA_9 ACAPELLA_TEMPLATE_PARA_8, T8
#define ACAPELLA_FUNCTION_ARGS_9 ACAPELLA_FUNCTION_ARGS_8, T8 t8
#define ACAPELLA_FUNCTION_PARA_9 ACAPELLA_FUNCTION_PARA_8, t8

#define ACAPELLA_TEMPLATE_ARGS_10 ACAPELLA_TEMPLATE_ARGS_9, typename T9
#define ACAPELLA_TEMPLATE_PARA_10 ACAPELLA_TEMPLATE_PARA_9, T9
#define ACAPELLA_FUNCTION_ARGS_10 ACAPELLA_FUNCTION_ARGS_9, T9 t9
#define ACAPELLA_FUNCTION_PARA_10 ACAPELLA_FUNCTION_PARA_9, t9

#define ACAPELLA_TEMPLATE_ARGS_11 ACAPELLA_TEMPLATE_ARGS_10, typename T10
#define ACAPELLA_TEMPLATE_PARA_11 ACAPELLA_TEMPLATE_PARA_10, T10
#define ACAPELLA_FUNCTION_ARGS_11 ACAPELLA_FUNCTION_ARGS_10, T10 t10
#define ACAPELLA_FUNCTION_PARA_11 ACAPELLA_FUNCTION_PARA_10, t10

#define ACAPELLA_TEMPLATE_ARGS_12 ACAPELLA_TEMPLATE_ARGS_11, typename T11
#define ACAPELLA_TEMPLATE_PARA_12 ACAPELLA_TEMPLATE_PARA_11, T11
#define ACAPELLA_FUNCTION_ARGS_12 ACAPELLA_FUNCTION_ARGS_11, T11 t11
#define ACAPELLA_FUNCTION_PARA_12 ACAPELLA_FUNCTION_PARA_11, t11

#define ACAPELLA_TEMPLATE_ARGS_13 ACAPELLA_TEMPLATE_ARGS_12, typename T12
#define ACAPELLA_TEMPLATE_PARA_13 ACAPELLA_TEMPLATE_PARA_12, T12
#define ACAPELLA_FUNCTION_ARGS_13 ACAPELLA_FUNCTION_ARGS_12, T12 t12
#define ACAPELLA_FUNCTION_PARA_13 ACAPELLA_FUNCTION_PARA_12, t12

#define ACAPELLA_TEMPLATE_ARGS_14 ACAPELLA_TEMPLATE_ARGS_13, typename T13
#define ACAPELLA_TEMPLATE_PARA_14 ACAPELLA_TEMPLATE_PARA_13, T13
#define ACAPELLA_FUNCTION_ARGS_14 ACAPELLA_FUNCTION_ARGS_13, T13 t13
#define ACAPELLA_FUNCTION_PARA_14 ACAPELLA_FUNCTION_PARA_13, t13

#define ACAPELLA_TEMPLATE_ARGS_15 ACAPELLA_TEMPLATE_ARGS_14, typename T14
#define ACAPELLA_TEMPLATE_PARA_15 ACAPELLA_TEMPLATE_PARA_14, T14
#define ACAPELLA_FUNCTION_ARGS_15 ACAPELLA_FUNCTION_ARGS_14, T14 t14
#define ACAPELLA_FUNCTION_PARA_15 ACAPELLA_FUNCTION_PARA_14, t14

#define ACAPELLA_TEMPLATE_ARGS_16 ACAPELLA_TEMPLATE_ARGS_15, typename T15
#define ACAPELLA_TEMPLATE_PARA_16 ACAPELLA_TEMPLATE_PARA_15, T15
#define ACAPELLA_FUNCTION_ARGS_16 ACAPELLA_FUNCTION_ARGS_15, T15 t15
#define ACAPELLA_FUNCTION_PARA_16 ACAPELLA_FUNCTION_PARA_15, t15

#define ACAPELLA_TEMPLATE_ARGS_17 ACAPELLA_TEMPLATE_ARGS_16, typename T16
#define ACAPELLA_TEMPLATE_PARA_17 ACAPELLA_TEMPLATE_PARA_16, T16
#define ACAPELLA_FUNCTION_ARGS_17 ACAPELLA_FUNCTION_ARGS_16, T16 t16
#define ACAPELLA_FUNCTION_PARA_17 ACAPELLA_FUNCTION_PARA_16, t16

#define ACAPELLA_TEMPLATE_ARGS_18 ACAPELLA_TEMPLATE_ARGS_17, typename T17
#define ACAPELLA_TEMPLATE_PARA_18 ACAPELLA_TEMPLATE_PARA_17, T17
#define ACAPELLA_FUNCTION_ARGS_18 ACAPELLA_FUNCTION_ARGS_17, T17 t17
#define ACAPELLA_FUNCTION_PARA_18 ACAPELLA_FUNCTION_PARA_17, t17

#define ACAPELLA_TEMPLATE_ARGS_19 ACAPELLA_TEMPLATE_ARGS_18, typename T18
#define ACAPELLA_TEMPLATE_PARA_19 ACAPELLA_TEMPLATE_PARA_18, T18
#define ACAPELLA_FUNCTION_ARGS_19 ACAPELLA_FUNCTION_ARGS_18, T18 t18
#define ACAPELLA_FUNCTION_PARA_19 ACAPELLA_FUNCTION_PARA_18, t18

#define ACAPELLA_TEMPLATE_ARGS_20 ACAPELLA_TEMPLATE_ARGS_19, typename T19
#define ACAPELLA_TEMPLATE_PARA_20 ACAPELLA_TEMPLATE_PARA_19, T19
#define ACAPELLA_FUNCTION_ARGS_20 ACAPELLA_FUNCTION_ARGS_19, T19 t19
#define ACAPELLA_FUNCTION_PARA_20 ACAPELLA_FUNCTION_PARA_19, t19

#define ACAPELLA_TEMPLATE_ARGS_21 ACAPELLA_TEMPLATE_ARGS_20, typename T20
#define ACAPELLA_TEMPLATE_PARA_21 ACAPELLA_TEMPLATE_PARA_20, T20
#define ACAPELLA_FUNCTION_ARGS_21 ACAPELLA_FUNCTION_ARGS_20, T20 t20
#define ACAPELLA_FUNCTION_PARA_21 ACAPELLA_FUNCTION_PARA_20, t20

#define ACAPELLA_TEMPLATE_ARGS_22 ACAPELLA_TEMPLATE_ARGS_21, typename T21
#define ACAPELLA_TEMPLATE_PARA_22 ACAPELLA_TEMPLATE_PARA_21, T21
#define ACAPELLA_FUNCTION_ARGS_22 ACAPELLA_FUNCTION_ARGS_21, T21 t21
#define ACAPELLA_FUNCTION_PARA_22 ACAPELLA_FUNCTION_PARA_21, t21

#define ACAPELLA_TEMPLATE_ARGS_23 ACAPELLA_TEMPLATE_ARGS_22, typename T22
#define ACAPELLA_TEMPLATE_PARA_23 ACAPELLA_TEMPLATE_PARA_22, T22
#define ACAPELLA_FUNCTION_ARGS_23 ACAPELLA_FUNCTION_ARGS_22, T22 t22
#define ACAPELLA_FUNCTION_PARA_23 ACAPELLA_FUNCTION_PARA_22, t22

#define ACAPELLA_TEMPLATE_ARGS_24 ACAPELLA_TEMPLATE_ARGS_23, typename T23
#define ACAPELLA_TEMPLATE_PARA_24 ACAPELLA_TEMPLATE_PARA_23, T23
#define ACAPELLA_FUNCTION_ARGS_24 ACAPELLA_FUNCTION_ARGS_23, T23 t23
#define ACAPELLA_FUNCTION_PARA_24 ACAPELLA_FUNCTION_PARA_23, t23

#define ACAPELLA_TEMPLATE_ARGS_25 ACAPELLA_TEMPLATE_ARGS_24, typename T24
#define ACAPELLA_TEMPLATE_PARA_25 ACAPELLA_TEMPLATE_PARA_24, T24
#define ACAPELLA_FUNCTION_ARGS_25 ACAPELLA_FUNCTION_ARGS_24, T24 t24
#define ACAPELLA_FUNCTION_PARA_25 ACAPELLA_FUNCTION_PARA_24, t24

#define ACAPELLA_TEMPLATE_ARGS_26 ACAPELLA_TEMPLATE_ARGS_25, typename T25
#define ACAPELLA_TEMPLATE_PARA_26 ACAPELLA_TEMPLATE_PARA_25, T25
#define ACAPELLA_FUNCTION_ARGS_26 ACAPELLA_FUNCTION_ARGS_25, T25 t25
#define ACAPELLA_FUNCTION_PARA_26 ACAPELLA_FUNCTION_PARA_25, t25

#define ACAPELLA_TEMPLATE_ARGS_27 ACAPELLA_TEMPLATE_ARGS_26, typename T26
#define ACAPELLA_TEMPLATE_PARA_27 ACAPELLA_TEMPLATE_PARA_26, T26
#define ACAPELLA_FUNCTION_ARGS_27 ACAPELLA_FUNCTION_ARGS_26, T26 t26
#define ACAPELLA_FUNCTION_PARA_27 ACAPELLA_FUNCTION_PARA_26, t26

#define ACAPELLA_TEMPLATE_ARGS_28 ACAPELLA_TEMPLATE_ARGS_27, typename T27
#define ACAPELLA_TEMPLATE_PARA_28 ACAPELLA_TEMPLATE_PARA_27, T27
#define ACAPELLA_FUNCTION_ARGS_28 ACAPELLA_FUNCTION_ARGS_27, T27 t27
#define ACAPELLA_FUNCTION_PARA_28 ACAPELLA_FUNCTION_PARA_27, t27

#define ACAPELLA_TEMPLATE_ARGS_29 ACAPELLA_TEMPLATE_ARGS_28, typename T28
#define ACAPELLA_TEMPLATE_PARA_29 ACAPELLA_TEMPLATE_PARA_28, T28
#define ACAPELLA_FUNCTION_ARGS_29 ACAPELLA_FUNCTION_ARGS_28, T28 t28
#define ACAPELLA_FUNCTION_PARA_29 ACAPELLA_FUNCTION_PARA_28, t28

#define ACAPELLA_TEMPLATE_ARGS_30 ACAPELLA_TEMPLATE_ARGS_29, typename T29
#define ACAPELLA_TEMPLATE_PARA_30 ACAPELLA_TEMPLATE_PARA_29, T29
#define ACAPELLA_FUNCTION_ARGS_30 ACAPELLA_FUNCTION_ARGS_29, T29 t29
#define ACAPELLA_FUNCTION_PARA_30 ACAPELLA_FUNCTION_PARA_29, t29

#define ACAPELLA_TEMPLATE_ARGS_31 ACAPELLA_TEMPLATE_ARGS_30, typename T30
#define ACAPELLA_TEMPLATE_PARA_31 ACAPELLA_TEMPLATE_PARA_30, T30
#define ACAPELLA_FUNCTION_ARGS_31 ACAPELLA_FUNCTION_ARGS_30, T30 t30
#define ACAPELLA_FUNCTION_PARA_31 ACAPELLA_FUNCTION_PARA_30, t30

#define ACAPELLA_TEMPLATE_ARGS_32 ACAPELLA_TEMPLATE_ARGS_31, typename T31
#define ACAPELLA_TEMPLATE_PARA_32 ACAPELLA_TEMPLATE_PARA_31, T31
#define ACAPELLA_FUNCTION_ARGS_32 ACAPELLA_FUNCTION_ARGS_31, T31 t31
#define ACAPELLA_FUNCTION_PARA_32 ACAPELLA_FUNCTION_PARA_31, t31

#define ACAPELLA_TEMPLATE_ARGS_33 ACAPELLA_TEMPLATE_ARGS_32, typename T32
#define ACAPELLA_TEMPLATE_PARA_33 ACAPELLA_TEMPLATE_PARA_32, T32
#define ACAPELLA_FUNCTION_ARGS_33 ACAPELLA_FUNCTION_ARGS_32, T32 t32
#define ACAPELLA_FUNCTION_PARA_33 ACAPELLA_FUNCTION_PARA_32, t32

#define ACAPELLA_TEMPLATE_ARGS_34 ACAPELLA_TEMPLATE_ARGS_33, typename T33
#define ACAPELLA_TEMPLATE_PARA_34 ACAPELLA_TEMPLATE_PARA_33, T33
#define ACAPELLA_FUNCTION_ARGS_34 ACAPELLA_FUNCTION_ARGS_33, T33 t33
#define ACAPELLA_FUNCTION_PARA_34 ACAPELLA_FUNCTION_PARA_33, t33

#define ACAPELLA_TEMPLATE_ARGS_35 ACAPELLA_TEMPLATE_ARGS_34, typename T34
#define ACAPELLA_TEMPLATE_PARA_35 ACAPELLA_TEMPLATE_PARA_34, T34
#define ACAPELLA_FUNCTION_ARGS_35 ACAPELLA_FUNCTION_ARGS_34, T34 t34
#define ACAPELLA_FUNCTION_PARA_35 ACAPELLA_FUNCTION_PARA_34, t34

#define ACAPELLA_TEMPLATE_ARGS_36 ACAPELLA_TEMPLATE_ARGS_35, typename T35
#define ACAPELLA_TEMPLATE_PARA_36 ACAPELLA_TEMPLATE_PARA_35, T35
#define ACAPELLA_FUNCTION_ARGS_36 ACAPELLA_FUNCTION_ARGS_35, T35 t35
#define ACAPELLA_FUNCTION_PARA_36 ACAPELLA_FUNCTION_PARA_35, t35

#define ACAPELLA_TEMPLATE_ARGS_37 ACAPELLA_TEMPLATE_ARGS_36, typename T36
#define ACAPELLA_TEMPLATE_PARA_37 ACAPELLA_TEMPLATE_PARA_36, T36
#define ACAPELLA_FUNCTION_ARGS_37 ACAPELLA_FUNCTION_ARGS_36, T36 t36
#define ACAPELLA_FUNCTION_PARA_37 ACAPELLA_FUNCTION_PARA_36, t36

#define ACAPELLA_TEMPLATE_ARGS_38 ACAPELLA_TEMPLATE_ARGS_37, typename T37
#define ACAPELLA_TEMPLATE_PARA_38 ACAPELLA_TEMPLATE_PARA_37, T37
#define ACAPELLA_FUNCTION_ARGS_38 ACAPELLA_FUNCTION_ARGS_37, T37 t37
#define ACAPELLA_FUNCTION_PARA_38 ACAPELLA_FUNCTION_PARA_37, t37

#define ACAPELLA_TEMPLATE_ARGS_39 ACAPELLA_TEMPLATE_ARGS_38, typename T38
#define ACAPELLA_TEMPLATE_PARA_39 ACAPELLA_TEMPLATE_PARA_38, T38
#define ACAPELLA_FUNCTION_ARGS_39 ACAPELLA_FUNCTION_ARGS_38, T38 t38
#define ACAPELLA_FUNCTION_PARA_39 ACAPELLA_FUNCTION_PARA_38, t38

#define ACAPELLA_TEMPLATE_ARGS_40 ACAPELLA_TEMPLATE_ARGS_39, typename T39
#define ACAPELLA_TEMPLATE_PARA_40 ACAPELLA_TEMPLATE_PARA_39, T39
#define ACAPELLA_FUNCTION_ARGS_40 ACAPELLA_FUNCTION_ARGS_39, T39 t39
#define ACAPELLA_FUNCTION_PARA_40 ACAPELLA_FUNCTION_PARA_39, t39

#define ACAPELLA_TEMPLATE_ARGS_41 ACAPELLA_TEMPLATE_ARGS_40, typename T40
#define ACAPELLA_TEMPLATE_PARA_41 ACAPELLA_TEMPLATE_PARA_40, T40
#define ACAPELLA_FUNCTION_ARGS_41 ACAPELLA_FUNCTION_ARGS_40, T40 t40
#define ACAPELLA_FUNCTION_PARA_41 ACAPELLA_FUNCTION_PARA_40, t40

#define ACAPELLA_TEMPLATE_ARGS_42 ACAPELLA_TEMPLATE_ARGS_41, typename T41
#define ACAPELLA_TEMPLATE_PARA_42 ACAPELLA_TEMPLATE_PARA_41, T41
#define ACAPELLA_FUNCTION_ARGS_42 ACAPELLA_FUNCTION_ARGS_41, T41 t41
#define ACAPELLA_FUNCTION_PARA_42 ACAPELLA_FUNCTION_PARA_41, t41

#define ACAPELLA_TEMPLATE_ARGS_43 ACAPELLA_TEMPLATE_ARGS_42, typename T42
#define ACAPELLA_TEMPLATE_PARA_43 ACAPELLA_TEMPLATE_PARA_42, T42
#define ACAPELLA_FUNCTION_ARGS_43 ACAPELLA_FUNCTION_ARGS_42, T42 t42
#define ACAPELLA_FUNCTION_PARA_43 ACAPELLA_FUNCTION_PARA_42, t42

#define ACAPELLA_TEMPLATE_ARGS_44 ACAPELLA_TEMPLATE_ARGS_43, typename T43
#define ACAPELLA_TEMPLATE_PARA_44 ACAPELLA_TEMPLATE_PARA_43, T43
#define ACAPELLA_FUNCTION_ARGS_44 ACAPELLA_FUNCTION_ARGS_43, T43 t43
#define ACAPELLA_FUNCTION_PARA_44 ACAPELLA_FUNCTION_PARA_43, t43

#define ACAPELLA_TEMPLATE_ARGS_45 ACAPELLA_TEMPLATE_ARGS_44, typename T44
#define ACAPELLA_TEMPLATE_PARA_45 ACAPELLA_TEMPLATE_PARA_44, T44
#define ACAPELLA_FUNCTION_ARGS_45 ACAPELLA_FUNCTION_ARGS_44, T44 t44
#define ACAPELLA_FUNCTION_PARA_45 ACAPELLA_FUNCTION_PARA_44, t44

#define ACAPELLA_TEMPLATE_ARGS_46 ACAPELLA_TEMPLATE_ARGS_45, typename T45
#define ACAPELLA_TEMPLATE_PARA_46 ACAPELLA_TEMPLATE_PARA_45, T45
#define ACAPELLA_FUNCTION_ARGS_46 ACAPELLA_FUNCTION_ARGS_45, T45 t45
#define ACAPELLA_FUNCTION_PARA_46 ACAPELLA_FUNCTION_PARA_45, t45

#define ACAPELLA_TEMPLATE_ARGS_47 ACAPELLA_TEMPLATE_ARGS_46, typename T46
#define ACAPELLA_TEMPLATE_PARA_47 ACAPELLA_TEMPLATE_PARA_46, T46
#define ACAPELLA_FUNCTION_ARGS_47 ACAPELLA_FUNCTION_ARGS_46, T46 t46
#define ACAPELLA_FUNCTION_PARA_47 ACAPELLA_FUNCTION_PARA_46, t46

#define ACAPELLA_TEMPLATE_ARGS_48 ACAPELLA_TEMPLATE_ARGS_47, typename T47
#define ACAPELLA_TEMPLATE_PARA_48 ACAPELLA_TEMPLATE_PARA_47, T47
#define ACAPELLA_FUNCTION_ARGS_48 ACAPELLA_FUNCTION_ARGS_47, T47 t47
#define ACAPELLA_FUNCTION_PARA_48 ACAPELLA_FUNCTION_PARA_47, t47

#define ACAPELLA_TEMPLATE_ARGS_49 ACAPELLA_TEMPLATE_ARGS_48, typename T48
#define ACAPELLA_TEMPLATE_PARA_49 ACAPELLA_TEMPLATE_PARA_48, T48
#define ACAPELLA_FUNCTION_ARGS_49 ACAPELLA_FUNCTION_ARGS_48, T48 t48
#define ACAPELLA_FUNCTION_PARA_49 ACAPELLA_FUNCTION_PARA_48, t48

#define ACAPELLA_TEMPLATE_ARGS_50 ACAPELLA_TEMPLATE_ARGS_49, typename T49
#define ACAPELLA_TEMPLATE_PARA_50 ACAPELLA_TEMPLATE_PARA_49, T49
#define ACAPELLA_FUNCTION_ARGS_50 ACAPELLA_FUNCTION_ARGS_49, T49 t49
#define ACAPELLA_FUNCTION_PARA_50 ACAPELLA_FUNCTION_PARA_49, t49

/************************************************************************/
/*   Auto Generated Code                                                */
/************************************************************************/
DELEGATE(ACAPELLA_TEMPLATE_ARGS_0, ACAPELLA_FUNCTION_ARGS_0, ACAPELLA_FUNCTION_PARA_0)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_1, ACAPELLA_FUNCTION_ARGS_1, ACAPELLA_FUNCTION_PARA_1)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_2, ACAPELLA_FUNCTION_ARGS_2, ACAPELLA_FUNCTION_PARA_2)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_3, ACAPELLA_FUNCTION_ARGS_3, ACAPELLA_FUNCTION_PARA_3)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_4, ACAPELLA_FUNCTION_ARGS_4, ACAPELLA_FUNCTION_PARA_4)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_5, ACAPELLA_FUNCTION_ARGS_5, ACAPELLA_FUNCTION_PARA_5)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_6, ACAPELLA_FUNCTION_ARGS_6, ACAPELLA_FUNCTION_PARA_6)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_7, ACAPELLA_FUNCTION_ARGS_7, ACAPELLA_FUNCTION_PARA_7)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_8, ACAPELLA_FUNCTION_ARGS_8, ACAPELLA_FUNCTION_PARA_8)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_9, ACAPELLA_FUNCTION_ARGS_9, ACAPELLA_FUNCTION_PARA_9)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_10, ACAPELLA_FUNCTION_ARGS_10, ACAPELLA_FUNCTION_PARA_10)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_11, ACAPELLA_FUNCTION_ARGS_11, ACAPELLA_FUNCTION_PARA_11)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_12, ACAPELLA_FUNCTION_ARGS_12, ACAPELLA_FUNCTION_PARA_12)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_13, ACAPELLA_FUNCTION_ARGS_13, ACAPELLA_FUNCTION_PARA_13)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_14, ACAPELLA_FUNCTION_ARGS_14, ACAPELLA_FUNCTION_PARA_14)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_15, ACAPELLA_FUNCTION_ARGS_15, ACAPELLA_FUNCTION_PARA_15)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_16, ACAPELLA_FUNCTION_ARGS_16, ACAPELLA_FUNCTION_PARA_16)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_17, ACAPELLA_FUNCTION_ARGS_17, ACAPELLA_FUNCTION_PARA_17)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_18, ACAPELLA_FUNCTION_ARGS_18, ACAPELLA_FUNCTION_PARA_18)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_19, ACAPELLA_FUNCTION_ARGS_19, ACAPELLA_FUNCTION_PARA_19)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_20, ACAPELLA_FUNCTION_ARGS_20, ACAPELLA_FUNCTION_PARA_20)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_21, ACAPELLA_FUNCTION_ARGS_21, ACAPELLA_FUNCTION_PARA_21)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_22, ACAPELLA_FUNCTION_ARGS_22, ACAPELLA_FUNCTION_PARA_22)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_23, ACAPELLA_FUNCTION_ARGS_23, ACAPELLA_FUNCTION_PARA_23)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_24, ACAPELLA_FUNCTION_ARGS_24, ACAPELLA_FUNCTION_PARA_24)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_25, ACAPELLA_FUNCTION_ARGS_25, ACAPELLA_FUNCTION_PARA_25)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_26, ACAPELLA_FUNCTION_ARGS_26, ACAPELLA_FUNCTION_PARA_26)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_27, ACAPELLA_FUNCTION_ARGS_27, ACAPELLA_FUNCTION_PARA_27)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_28, ACAPELLA_FUNCTION_ARGS_28, ACAPELLA_FUNCTION_PARA_28)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_29, ACAPELLA_FUNCTION_ARGS_29, ACAPELLA_FUNCTION_PARA_29)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_30, ACAPELLA_FUNCTION_ARGS_30, ACAPELLA_FUNCTION_PARA_30)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_31, ACAPELLA_FUNCTION_ARGS_31, ACAPELLA_FUNCTION_PARA_31)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_32, ACAPELLA_FUNCTION_ARGS_32, ACAPELLA_FUNCTION_PARA_32)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_33, ACAPELLA_FUNCTION_ARGS_33, ACAPELLA_FUNCTION_PARA_33)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_34, ACAPELLA_FUNCTION_ARGS_34, ACAPELLA_FUNCTION_PARA_34)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_35, ACAPELLA_FUNCTION_ARGS_35, ACAPELLA_FUNCTION_PARA_35)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_36, ACAPELLA_FUNCTION_ARGS_36, ACAPELLA_FUNCTION_PARA_36)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_37, ACAPELLA_FUNCTION_ARGS_37, ACAPELLA_FUNCTION_PARA_37)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_38, ACAPELLA_FUNCTION_ARGS_38, ACAPELLA_FUNCTION_PARA_38)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_39, ACAPELLA_FUNCTION_ARGS_39, ACAPELLA_FUNCTION_PARA_39)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_40, ACAPELLA_FUNCTION_ARGS_40, ACAPELLA_FUNCTION_PARA_40)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_41, ACAPELLA_FUNCTION_ARGS_41, ACAPELLA_FUNCTION_PARA_41)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_42, ACAPELLA_FUNCTION_ARGS_42, ACAPELLA_FUNCTION_PARA_42)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_43, ACAPELLA_FUNCTION_ARGS_43, ACAPELLA_FUNCTION_PARA_43)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_44, ACAPELLA_FUNCTION_ARGS_44, ACAPELLA_FUNCTION_PARA_44)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_45, ACAPELLA_FUNCTION_ARGS_45, ACAPELLA_FUNCTION_PARA_45)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_46, ACAPELLA_FUNCTION_ARGS_46, ACAPELLA_FUNCTION_PARA_46)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_47, ACAPELLA_FUNCTION_ARGS_47, ACAPELLA_FUNCTION_PARA_47)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_48, ACAPELLA_FUNCTION_ARGS_48, ACAPELLA_FUNCTION_PARA_48)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_49, ACAPELLA_FUNCTION_ARGS_49, ACAPELLA_FUNCTION_PARA_49)
DELEGATE(ACAPELLA_TEMPLATE_ARGS_50, ACAPELLA_FUNCTION_ARGS_50, ACAPELLA_FUNCTION_PARA_50)

/************************************************************************/
/*   Auto Generated Code                                                */
/************************************************************************/
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_0, ACAPELLA_FUNCTION_ARGS_0, ACAPELLA_FUNCTION_PARA_0)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_1, ACAPELLA_FUNCTION_ARGS_1, ACAPELLA_FUNCTION_PARA_1)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_2, ACAPELLA_FUNCTION_ARGS_2, ACAPELLA_FUNCTION_PARA_2)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_3, ACAPELLA_FUNCTION_ARGS_3, ACAPELLA_FUNCTION_PARA_3)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_4, ACAPELLA_FUNCTION_ARGS_4, ACAPELLA_FUNCTION_PARA_4)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_5, ACAPELLA_FUNCTION_ARGS_5, ACAPELLA_FUNCTION_PARA_5)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_6, ACAPELLA_FUNCTION_ARGS_6, ACAPELLA_FUNCTION_PARA_6)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_7, ACAPELLA_FUNCTION_ARGS_7, ACAPELLA_FUNCTION_PARA_7)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_8, ACAPELLA_FUNCTION_ARGS_8, ACAPELLA_FUNCTION_PARA_8)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_9, ACAPELLA_FUNCTION_ARGS_9, ACAPELLA_FUNCTION_PARA_9)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_10, ACAPELLA_FUNCTION_ARGS_10, ACAPELLA_FUNCTION_PARA_10)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_11, ACAPELLA_FUNCTION_ARGS_11, ACAPELLA_FUNCTION_PARA_11)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_12, ACAPELLA_FUNCTION_ARGS_12, ACAPELLA_FUNCTION_PARA_12)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_13, ACAPELLA_FUNCTION_ARGS_13, ACAPELLA_FUNCTION_PARA_13)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_14, ACAPELLA_FUNCTION_ARGS_14, ACAPELLA_FUNCTION_PARA_14)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_15, ACAPELLA_FUNCTION_ARGS_15, ACAPELLA_FUNCTION_PARA_15)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_16, ACAPELLA_FUNCTION_ARGS_16, ACAPELLA_FUNCTION_PARA_16)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_17, ACAPELLA_FUNCTION_ARGS_17, ACAPELLA_FUNCTION_PARA_17)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_18, ACAPELLA_FUNCTION_ARGS_18, ACAPELLA_FUNCTION_PARA_18)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_19, ACAPELLA_FUNCTION_ARGS_19, ACAPELLA_FUNCTION_PARA_19)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_20, ACAPELLA_FUNCTION_ARGS_20, ACAPELLA_FUNCTION_PARA_20)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_21, ACAPELLA_FUNCTION_ARGS_21, ACAPELLA_FUNCTION_PARA_21)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_22, ACAPELLA_FUNCTION_ARGS_22, ACAPELLA_FUNCTION_PARA_22)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_23, ACAPELLA_FUNCTION_ARGS_23, ACAPELLA_FUNCTION_PARA_23)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_24, ACAPELLA_FUNCTION_ARGS_24, ACAPELLA_FUNCTION_PARA_24)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_25, ACAPELLA_FUNCTION_ARGS_25, ACAPELLA_FUNCTION_PARA_25)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_26, ACAPELLA_FUNCTION_ARGS_26, ACAPELLA_FUNCTION_PARA_26)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_27, ACAPELLA_FUNCTION_ARGS_27, ACAPELLA_FUNCTION_PARA_27)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_28, ACAPELLA_FUNCTION_ARGS_28, ACAPELLA_FUNCTION_PARA_28)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_29, ACAPELLA_FUNCTION_ARGS_29, ACAPELLA_FUNCTION_PARA_29)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_30, ACAPELLA_FUNCTION_ARGS_30, ACAPELLA_FUNCTION_PARA_30)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_31, ACAPELLA_FUNCTION_ARGS_31, ACAPELLA_FUNCTION_PARA_31)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_32, ACAPELLA_FUNCTION_ARGS_32, ACAPELLA_FUNCTION_PARA_32)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_33, ACAPELLA_FUNCTION_ARGS_33, ACAPELLA_FUNCTION_PARA_33)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_34, ACAPELLA_FUNCTION_ARGS_34, ACAPELLA_FUNCTION_PARA_34)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_35, ACAPELLA_FUNCTION_ARGS_35, ACAPELLA_FUNCTION_PARA_35)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_36, ACAPELLA_FUNCTION_ARGS_36, ACAPELLA_FUNCTION_PARA_36)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_37, ACAPELLA_FUNCTION_ARGS_37, ACAPELLA_FUNCTION_PARA_37)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_38, ACAPELLA_FUNCTION_ARGS_38, ACAPELLA_FUNCTION_PARA_38)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_39, ACAPELLA_FUNCTION_ARGS_39, ACAPELLA_FUNCTION_PARA_39)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_40, ACAPELLA_FUNCTION_ARGS_40, ACAPELLA_FUNCTION_PARA_40)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_41, ACAPELLA_FUNCTION_ARGS_41, ACAPELLA_FUNCTION_PARA_41)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_42, ACAPELLA_FUNCTION_ARGS_42, ACAPELLA_FUNCTION_PARA_42)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_43, ACAPELLA_FUNCTION_ARGS_43, ACAPELLA_FUNCTION_PARA_43)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_44, ACAPELLA_FUNCTION_ARGS_44, ACAPELLA_FUNCTION_PARA_44)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_45, ACAPELLA_FUNCTION_ARGS_45, ACAPELLA_FUNCTION_PARA_45)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_46, ACAPELLA_FUNCTION_ARGS_46, ACAPELLA_FUNCTION_PARA_46)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_47, ACAPELLA_FUNCTION_ARGS_47, ACAPELLA_FUNCTION_PARA_47)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_48, ACAPELLA_FUNCTION_ARGS_48, ACAPELLA_FUNCTION_PARA_48)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_49, ACAPELLA_FUNCTION_ARGS_49, ACAPELLA_FUNCTION_PARA_49)
DELEGATE_LIST(ACAPELLA_TEMPLATE_ARGS_50, ACAPELLA_FUNCTION_ARGS_50, ACAPELLA_FUNCTION_PARA_50)

/************************************************************************/
/*   Auto Generated Code                                                */
/************************************************************************/
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_0, ACAPELLA_TEMPLATE_PARA_0)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_1, ACAPELLA_TEMPLATE_PARA_1)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_2, ACAPELLA_TEMPLATE_PARA_2)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_3, ACAPELLA_TEMPLATE_PARA_3)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_4, ACAPELLA_TEMPLATE_PARA_4)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_5, ACAPELLA_TEMPLATE_PARA_5)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_6, ACAPELLA_TEMPLATE_PARA_6)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_7, ACAPELLA_TEMPLATE_PARA_7)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_8, ACAPELLA_TEMPLATE_PARA_8)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_9, ACAPELLA_TEMPLATE_PARA_9)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_10, ACAPELLA_TEMPLATE_PARA_10)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_11, ACAPELLA_TEMPLATE_PARA_11)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_12, ACAPELLA_TEMPLATE_PARA_12)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_13, ACAPELLA_TEMPLATE_PARA_13)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_14, ACAPELLA_TEMPLATE_PARA_14)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_15, ACAPELLA_TEMPLATE_PARA_15)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_16, ACAPELLA_TEMPLATE_PARA_16)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_17, ACAPELLA_TEMPLATE_PARA_17)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_18, ACAPELLA_TEMPLATE_PARA_18)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_19, ACAPELLA_TEMPLATE_PARA_19)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_20, ACAPELLA_TEMPLATE_PARA_20)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_21, ACAPELLA_TEMPLATE_PARA_21)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_22, ACAPELLA_TEMPLATE_PARA_22)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_23, ACAPELLA_TEMPLATE_PARA_23)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_24, ACAPELLA_TEMPLATE_PARA_24)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_25, ACAPELLA_TEMPLATE_PARA_25)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_26, ACAPELLA_TEMPLATE_PARA_26)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_27, ACAPELLA_TEMPLATE_PARA_27)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_28, ACAPELLA_TEMPLATE_PARA_28)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_29, ACAPELLA_TEMPLATE_PARA_29)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_30, ACAPELLA_TEMPLATE_PARA_30)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_31, ACAPELLA_TEMPLATE_PARA_31)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_32, ACAPELLA_TEMPLATE_PARA_32)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_33, ACAPELLA_TEMPLATE_PARA_33)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_34, ACAPELLA_TEMPLATE_PARA_34)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_35, ACAPELLA_TEMPLATE_PARA_35)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_36, ACAPELLA_TEMPLATE_PARA_36)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_37, ACAPELLA_TEMPLATE_PARA_37)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_38, ACAPELLA_TEMPLATE_PARA_38)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_39, ACAPELLA_TEMPLATE_PARA_39)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_40, ACAPELLA_TEMPLATE_PARA_40)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_41, ACAPELLA_TEMPLATE_PARA_41)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_42, ACAPELLA_TEMPLATE_PARA_42)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_43, ACAPELLA_TEMPLATE_PARA_43)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_44, ACAPELLA_TEMPLATE_PARA_44)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_45, ACAPELLA_TEMPLATE_PARA_45)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_46, ACAPELLA_TEMPLATE_PARA_46)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_47, ACAPELLA_TEMPLATE_PARA_47)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_48, ACAPELLA_TEMPLATE_PARA_48)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_49, ACAPELLA_TEMPLATE_PARA_49)
DELEGATE_TYPE(ACAPELLA_TEMPLATE_ARGS_50, ACAPELLA_TEMPLATE_PARA_50)


}
}

#endif//_DELEGATE_H_

